<?php

class IndexController extends Zend_Controller_Action {   
	
	public function indexAction()    {
		
		global $db, $questoes_por_volume ;
		
		require_once('classes/class.questao.php') ;
		
		$contest = new Questao($db) ;
		$this->view->res = $contest->select_from(array('COUNT(*) AS total_quest'), '') ;
		$this->view->total_vol = floor($this->view->res[0]->total_quest/$questoes_por_volume) ;
	
	}
	
	public function helloAction() {
		
		global $db, $questoes_por_volume, $base_url ;
		
		require_once('classes/class.questao.php') ;
		
		$contest = new Questao($db) ;
		$this->view->res = $contest->select_from(array('COUNT(*) AS total_quest'), '') ;
		$this->view->total_vol = floor($this->view->res[0]->total_quest/$questoes_por_volume) ;
		$this->view->base_url = $base_url ;
	}
	
}


?>